package com.xwtec.crawler.mapper;

import com.xwtec.crawler.entity.Crawler;

import java.util.List;
import java.util.Map;

//@Mapper
public interface CrawlerMapper {

    //注解版
  /*  @Insert("insert into tb_crawler(cid,curl,clevel,cfid,ctime) values(seq_tb_crawler.nextval,#{curl},#{clevel},#{cfid},#{ctime})")
    public int insertCrawler(Crawler crawler);

    @Delete("delete from tb_crawler where cid=#{cid}")
    public int deleteCrawler(Integer cid);

    @Select("select * from tb_crawler where cid=#{cid}")
    public Crawler getCrawlerById(Integer cid);*/

    //配置版

    public Crawler queryCrawlerById(Integer cid);

    public void insertCrawler(Crawler crawler);

    public List<Crawler> queryFirstUrls();

    //查询敏感词
    public List<String> querySensitive();

    //查询待爬虫链接
    public List<String> queryUrls();

    //插入敏感词结果
    public int insertCrawlerResult(Map<String, String> map);
}
